<?php foreach ($this->entries as $ent) :?>
<div class="<?php if (!$ent->isRead()) echo 'new';?>mail">
	<div class="head">
		<div class="object">Object : <?php echo ucfirst($ent->getObject());?></div>
		<div class="user">By <?php echo ucfirst($ent->getPseudo());?></div>
	</div>
	<div class="date"><?php echo $ent->getDate();?></div>
	<a href="<?php echo $this->url(array('module'=>'admin','controller'=>'mail','action'=>'read','mail'=>$ent->getId()),'default',true);?>"></a>
</div>
<?php endforeach;?>
<?php echo $this->paginationControl($this->entries, 'Elastic', 'pagination_controll.phtml')?>

<?php $this->headScript()->appendScript('$(document).ready(function(){
	$(".mail, .newmail").click(function(){
		window.location=$(this).find("a").attr("href"); return false;
	});
});')?>